package com.zcy.tag2;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class DisplayOrSkip extends SimpleTagSupport {

	@Override
	public void doTag() throws JspException, IOException {
		SimpleDateFormat simple=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
    	String dateStr=simple.format(new Date());
    	JspWriter jspWriter = getJspContext().getOut();
    	jspWriter.write(dateStr);
    	jspWriter.close();
	}

}
